The purpose of a controller is to force, in a meritorious way, the response of a system (conventionally called the plant) to achieve a specified response (the reference signal).
Controllers are ubiquitous in real world industrial and commercial settings. Controllers are embedded in almost every electronic product and every real-world mechanical and thermodynamic system.
The discovery of efficient controllers is of considerable practical importance because a small percentage improvement in the operation of plants translates into large economic savings.
The cruise control device in an automobile is an example of a controller. The driver may want his automobile to travel at 65 miles per hour (mph). The controller causes fuel to flow into the automobile's engine (the plant) so as to close the gap between the car's current speed (the current plant response) and the desired speed (the reference signal). Since the plant does not respond instantaneously to a new setting of the reference signal by the driver, the speed of the car (the plant response) does not instantaneously become 65 mph. Instead, the controller continuously adjusts the flow of fuel based on the continuously changing difference between the car's actual speed and the reference signal. That is, there is continuous feedback of the plant output to the controller. If the automobile was traveling at less than 65 mph when the reference signal was initially set to 65 mph, the output signal of the controller (the control variable) would be set to initially increase the flow of fuel to the automobile's engine. On the other hand, if the automobile automobile's speed was greater than 65 mph, the output signal of the controller (the control variable) would be set to initially decrease the flow of fuel.
Some controllers are constructed from components that operate in continuous time. For example, controllers can be constructed from mechanical, pneumatic, and electrical components (e.g., inductors, capacitors, resistors, amplifiers). These components operate in continuous time. In addition, many other real-world controllers are constructed from components that operate in discrete time steps such that the overall effect closely (and adequately) approximates the continuous version of the same controller.
Many real-world controllers are manual. However, the focus herein is on automatic controllers—that is, controllers that automatically process information concerning reference signal(s) and plant response(s) (and possibly other information, such as the available internal states of the plant) in order to generate the control signals.
FIG. 1 shows elements of an illustrative closed-loop feedback controller in a system. Referring to FIG. 1, a controller 120 and a plant 140 are contained in the system. The output of the controller is a control variable (signal) 130. The control variable 130 is the input to the plant 140. The plant 140 has one output 150 (referred to herein as the plant response). The controller 120 has two inputs, namely the reference signal 110 and the plant response 150. Controller 120 receives the plant response 150 by use of the feedback signal 160. The system in FIG. 1 is called a “closed loop” system because there is feedback 160 of the plant output 150 back to the controller 120. A feedback loop created by feedback signal 160 is referred to herein as an external feedback because the feedback loop is external to the controller 120. Controllers without such external feedback are called “open loop” controllers. “Open loop” controllers are considerably simpler (and generally less useful in real world applications) than “closed loop” controllers. The actual plant response 150 is typically compared to the externally supplied reference signal 110. This comparison typically entails subtracting these two time-domain signals. When the comparison is done in this way, the controller acts only on the difference between the actual plant response 150 and the reference signal 110. When subtraction is used, the subtractor (not shown here) is sometimes shown outside of controller 120. In any event, regardless of how the comparison between the plant output and the reference signal is performed and regardless of where it is shown, the purpose of a closed-loop controller is to produce, given the reference signal 110 and the feedback signal 160, a value for the control variable 130 that causes the plant response to approach and/or match the reference signal 110 in a meritorious way.
Controller 120 may have more than one distinct output (i.e., control variable). In that event, each such control variable is an input to the plant.
Plant 140 may have more than one distinct output 150. If a plant has k outputs that are to be controlled, then there are k reference signals and each reference signal is paired with a particular plant output that is to be controlled. Each of the k plant outputs that is to be controlled is compared with (e.g., subtracted from) its associated reference signal. The controller uses the results of the k comparisons in determining the output(s) of the controller.
In addition, internal states of a plant are sometimes made available as additional inputs to a controller. Internal states provide additional information to the controller. The number of plant outputs, the number of control variables, and the number of internal states (if any are used at all) are, in general, not equal to each other (although they may, by coincidence, be equal).
Automatic controllers are typically constructed from a variety of signal-processing blocks that process time-domain signals. Each processing block has one or more inputs and a single output. Examples include, but are not limited to,                gain (i.e., multiplication of a time-domain signal by a constant),        differeutiator (which can be represented with a transfer function of S, where s is the Laplace transform operator),        integrator (transfer function of 1/s),        adder,        subtractor (an adder in which one input is negated),        lead (transfer function of the form 1+τs),        lag (transfer function of the form 1/(1+τs)),        differential input integrators (i.e., integral of the difference between two signals),        delay,        inverter,        absolute value,        limiter,        multiplier (i.e., multiplication of two signals),        divider, and        conditional operators (switches).        
FIG. 2 is a block diagram of a control system consisting of a plant and a PID controller composed of proportional, integrative, derivative, adder, and subtractor blocks. The output signal of the illustrative controller 500 is control variable 590. The control variable is, in turn, the input to the plant 592. The plant has one output (plant response) 594. The plant response is fed back (externally as signal 596) and becomes one of the controller's two inputs. The controller's other input is the reference signal 508. The fed-back plant response, signal 596, and the externally supplied reference signal 508 are compared (by simple subtraction at subtractor 510). The providing of the plant output as an input to the controller is often referred to as external feedback.
The input to a controller typically consists of reference signal(s) and plant response(s). The input to a controller sometimes also includes internal state variables of the plant. Sometimes, the output(s) of the controller may be made directly available as inputs to the controller. The providing of the controller output as an input to the controller is sometimes referred to as internal feedback. Sometimes, there is a form of internal feedback in which the output other than the controller's final output is provided as an input to the controller. This is another example of internal feedback. In practice, a controller often uses the difference (error) between each reference signal and the corresponding plant response.
The output of a controller consists of control variable(s) that are passed from the controller to the plant.
The individual signal-processing blocks of a controller are coupled to one another in a particular topological arrangement. The topology of a controller entails the specification of                the total number of processing blocks to be employed in the controller,        the type of each block (e.g., gain, integrator, differentiator, lead, lag, adder, subtractor),        the connections (directed lines) between the input point(s) and the output point of each block in the controller,        the connections (directed lines) between blocks of the controller and the external input(s) to the controller, and        the connections (directed lines) between blocks of the controller and the external output(s) of the controller.        
Block diagrams are a useful tool for representing the flow of information in controllers and systems containing controllers. Block diagrams contain signal-processing function blocks, external input and output points, and directed lines carrying signals between the blocks.
Lines in a block diagram herein represent time-domain signals. Lines herein are directional in that they represent the flow of information. A function block within a block diagram for a controller typically has one or more inputs, but only one output. The lines pointing toward a block represent signals coming into the block. The single line pointing away from a block represents the block's single output.
In a block diagram herein, an external input is represented by an external point with a directed line pointing away from that point. Similarly, in the block diagrams herein, an external output point is represented by an external point with a line pointing toward that point.
Adders are conventionally represented by circles in the block diagrams included herein, where each input to an adder is labeled with a positive or negative sign (so adders may be used to perform both addition and subtraction).
In FIG. 2, adder 510 performs the function of subtracting the plant output 596 (which is given a minus sign) from the externally supplied reference signal 508 (which is given a plus sign). This particular arrangement implements negative feedback.
Takeoff points (conventionally represented in block diagrams herein by a large dot) provide a way to disseminate a signal to more than one other function block in a block diagram. Takeoff point 520 in FIG. 2 receives subtractor output 512 and disseminates this signal to function blocks 530, 540, and 550.
In FIG. 2, subtractor output 512 output from subtractor 510 is passed (through 520 and 522) into a gain block 530. A gain block (as shown in FIG. 2 as a triangle) multiplies (amplifies) its input by a specified constant amplification factor (e.g., the numerical constant 214.0). The amplified result 538 becomes the first of the three inputs to addition block 580. This portion of FIG. 2 implements proportional control. The simplest type of controller merely considers the difference (error) between the reference signal and the plant output and produces a control variable (i.e., the input to the plant) that is proportional to the current value of the error. However, for all but the simplest situations, proportional control leads to overshoot, instability, and inefficiency. These deficiencies are addressed by the remaining blocks of FIG. 2.
The subtractor's output 512 is also passed (through 520 and 524) into gain block 540 (with a gain of 1,000.0) and the amplified result 548 is passed into integrator block 560. The integrator is shown in FIG. 2 by a rectangle labeled 1/s, where s is the Laplace transform variable. The result 568 of this integration (with respect to time) becomes the second input to addition block 580. This portion of the Figure implements integral control based on the integral, over time, of the difference between the plant output and reference signal.
The subtractor's output 512 is also passed (through 520 and 526) into gain block 550 (with a gain of 15.5) and the amplified result 558 is passed into differentiator block 570 (shown in the Figure by a rectangle labeled with the Laplace transform variable s) and becomes the third input to addition block 580. This portion of the Figure implements derivative control based on the derivative, over time, of the difference between the plant output and reference signal.
Since the output (i.e., control variable 590) of the controller in FIG. 2 is the sum of a proportional (P) term, an integrative (I) term, and a differentiating (D) term, this type of controller is called a PID controller.
Each of the three parts of a PID controller contributes to its overall performance.
The proportional part of the controller provides direct feedback of the error between the plant output and the externally supplied reference signal.
The integral part of the controller enables the controller to make the plant output agree with the reference signal in the steady state. Even a small positive (negative) error will, when integrated over time, lead to an increasing (decreasing) control signal.
The derivative part of the controller enables the controller to improve closed-loop stability. A proportional controller is almost always late in compensating for an error between the plant output and the reference signal. The derivative part of the controller enables the controller to make a prediction of future error (based on extrapolating the slope of the tangent to the error curve).
The PID controller was patented in 1939 by Albert Callender and Allan Stevenson of Imperial Chemical Limited of Northwich, England. The PID controller was a significant improvement over earlier and simpler control techniques (which often were merely proportional).
There are many different measures of merit that are commonly used for controllers.
For example, it is common to want to minimize the time required to bring about the desired response of the plant. Sometimes, the goal of minimizing the time required to bring about the desired plant response is stated in terms of the rise time or the settling time. The rise time is the time required for the plant output to first reach a specified percentage (e.g., 95%) of the reference signal. The settling time is the first time for which the plant response reaches and stays within a specified percentage (e.g., 2%) of the reference signal. More frequently, control engineers express the goal of minimizing the time required to bring about the desired plant response in terms of minimizing the integral of the time-weighted absolute error. This measure favors the rapid reduction of the discrepancy between the reference signal and the plant response and imposes ever-greater penalties on discrepancies that occur at later times.
Typically, a controller is required to do much more than merely minimize the time-weighted absolute error. The measure of merit of a controller is typically multi-objective in the sense that it involves more than one element. In practice, there is often a conflict among these elements.
For example, in addition to wanting to minimize the time required to bring about the desired plant response, it is also common to simultaneously want to avoid significantly overshooting the desired plant response. In the case where the reference signal is initially greater than the plant response, the overshoot is the percentage by which the plant response exceeds the reference signal after first achieving the reference value. Although it is desirable for the automobile to quickly reach the desired speed, the driver certainly does not want to achieve this goal by providing so much fuel that the car's speed first increases to 120 miles per hour. Such an strategy would undoubtedly reduce the time required to reach 65 mph; however, this strategy would drastically overshoot the reference signal.
Overshoot can be dangerous because the plant can be destroyed (e.g., a boiler exceeds its safe operating temperature).
Moreover, overshoot is typically costly in terms of energy. The cost of the energy required to bring about the desired plant response is often an additional explicit consideration in measuring the merit of a controller.
Real-world controllers must also comply with the reality that the actual value of a control variable must be finite (e.g., cannot be an impulse of infinite amplitude). Thus, it is also common to place certain practical limits on the value of the control variable(s) so that the plant is not presented with extreme values for the control variable(s). This is often accomplished by inserting a limiter between the controller and the plant. The limiter alone introduces significant non-linearity into the overall control process. A plant's internal state variables are often similarly constrained.
All real-world plants, controllers, and their sensors are imperfect. For example, the plant usually does not have the precise characteristics that the control engineer thinks that it has. One reason for this is that the plant's characteristics are not known with either precision or certainty. Another reason is that the plant's characteristics vary at random or drift over time as the plant ages. Thus, it is desirable that a controller operates robustly in the face of variations in the actual characteristics of the plant.
Similarly, in the real world, a plant typically does not accurately receive the control signal that the controller actually produced. It is desirable that a controller operates robustly in the face of disturbances that may be added into the controller's output (i.e., the control variable) prior to reaching the plant. Thus, disturbance rejection is often a requirement of an effective real world controller.
Also, the controller may not receive an accurate reading of the plant's output or the reference signal because of sensor noise. It is desirable that a controller operates robustly in the face of noise in the plant output or reference signal.
A good controller should operate in a consistent manner in the face of variations in the step size of the reference signal.
Stability is another important consideration in measuring the merit of a controller. In fact, it is often an overriding concern. A system whose performance varies radically with small changes in the plant (e.g., a car whose engine response doubled with a small change in temperature) would, at the minimum, be useless and, at worst be dangerous.
PID controllers are in widespread use in industry today. As Astrom and Hagglund (1995, referenced above) noted,                “In process control, more than 95% of the control loops are of PID types”        
However, even though PD controllers are in widespread use in industry today, the need for better controllers is widely recognized. As Astrom and Hagglund (1995, page 4) further observe,                “ . . . audits of paper mills in Canada [show] that a typical mill has more than 2,000 control loops and that 97% use PI control. Only 20% of the control loops were found to work well.”        
As Astrom and Hagglund (1995, page 2) also observe,                “A large cadre of instrument and process engineers are familiar with PD control. There is a well-established practice of installing, tuning, and using the controllers. In spite of this there are substantial potentials for improving PD control.”        
Boyd and Barratt stated in Linear Controller Design: Limits of Performance (Boyd and Barratt 1991) state,                “The challenge for controller design is to productively use the enormous computing power available. Many current methods of computer-aided controller design simply automate procedures developed in the 1930's through the 1950's, for example, plotting root loci or Bode plots. Even the ‘modern’ state-space and frequency-domain methods (which require the solution of algebraic Riccati equations) greatly underutilize available computing power.”        
Before a PID controller can be used, it is necessary to choose (tune) the numerical parameters for the controller's signal-processing blocks.
For decades, the Ziegler-Nichols tuning rules (Ziegler and Nichols 1942) have been in widespread use for tuning of PD controllers.
In their influential 1995 book PID Controllers: Theory, Design, and Tuning, Astrom and Hagglund (1995) identified four families of plants “that are representative for the dynamics of typical industrial processes.”
Astrom and Hagglund developed a method in their 1995 book for automatically tuning PID controllers for all the plants in all four of these industrially representative families of plants. Astrom and Hagglund employed the widely used Ziegler-Nichols rules as a “starting point” for their work. The Astrom-Hagglund tuning rules outperform the widely used Ziegler-Nichols rules on all the plants in all four families of plants. As Astrom and Hagglund observe,                “[Our] new methods give substantial improvements in control performance while retaining much of the simplicity of the Ziegler-Nichols rules.”        
The methods developed by Astrom and Hagglund use several parameters representing the overall characteristics of a plant. These parameters are not, of course, a complete representation of the behavior of the plant. However, these parameters offer the practical advantage of being obtainable for real-world plants by means of relatively straightforward testing that may be readily performed in the field.
In one version of their method, Astrom and Hagglund use two frequency-domain parameters, namely the ultimate gain, Ku (the minimum value of the gain that must be introduced into the feedback path to cause the system to oscillate) and the ultimate period, Tu (the period of this lowest frequency oscillation). In another version of their method, Astrom and Hagglund use two time-domain parameters, namely the time constant, Tr, and the dead time, L (the period before the plant output begins to respond significantly to a new reference signal). Astrom and Hagglund describe a procedure for estimating these parameters from the plant's response to a step input.
Early PID controllers were built from mechanical, pneumatic, or analog electrical components that implemented the proportional, integrative, and derivative parts of the PID controller. For example, inductors and capacitors can be used to implement differentiation and integration in an analog electrical controller. The component values of these physical components were variable-valued. However, the topology of these controllers was typically not variable. Instead, the topology was the fixed proportional-integrative-derivative topology. However, as Astrom and Hagglund (1995) observe:                “Practically all PID controllers made today are based on microprocessors.”        The fact that most present day controllers are electronic devices that are programmed by use of software means that a topology that differs from the conventional PID topology can be readily implemented today merely by changing software.        